import { IsDateString } from 'class-validator';
import { NumberField, StringField } from 'src/common/decorator/validators';

export class EmployeeEntity {
  id?: string;

  @StringField({ required: true })
  name: string;
  @StringField({ required: true })
  employeeCode: string;

  @StringField()
  idNumber?: string | null;
  @StringField()
  phone?: string | null;
  @StringField()
  email?: string | null;
  @StringField()
  position?: string | null;

  @IsDateString()
  hireDate?: Date | string | null;
  @StringField()
  status?: string;
  @StringField()
  departmentId?: string | null;
  createdAt?: Date | string;
  updatedAt?: Date | string;

  userId?: string | null;
}
